<%-- 
    Document   : register
    Created on : 8-okt-2012, 11:56:50
    Author     : Elmar
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <link href="./resources/css/default.css" rel="stylesheet" type="text/css" />
        <link href="./resources/css/cssLayout.css" rel="stylesheet" type="text/css" />
        <link rel="shortcut icon" type="image/x-icon" href="./resources/images/images.jpeg"/>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>Cupido</title>
    </head>
    <body>
        <div id="top">
            <div id="header">
                <h1>Cupido</h1>
            </div>
            <div id="logindiv">
                <% 
                    String username = (String) session.getAttribute("username");
                    //if username is null, it means there is no logged in user
                    if(username == null)
                    {
                        %>
                            <form name="login" action="login" method ="post">
                                <table>
                                    <tr>
                                        <td>Gebruikersnaam: </td><td><input type="text" name="username" value="" /></td>
                                        <td>Wachtwoord: </td><td><input type="password" name="password" value="" /></td>
                                        <td><input type="submit" value="Login" /></td>
                                    </tr>
                                </table>
                            </form>
                        <%
                    }
                    else{
                        out.print("U bent ingelogd als: " + username);
                        out.print("</br><a href='./logout'>log uit</a>");
                    }
                %>
                
            </div>
        </div>